﻿@model SIG.InputModel.Front.SetupWizard.SetupAdminIM
@{
    ViewBag.Title = "网站安装";
    Layout = "~/Views/Shared/_SetupLayout.cshtml";
}

<div class="container">
    <header class="page-header">
        <h1 class="text-center">网站安装</h1>
    </header>

    @if (TempData["error"] != null)
    {
        <div class="alert alert-danger">
            <p>@TempData["error"].ToString()</p>
        </div>
        <div class="well text-center">
            <a href="@Url.Action("Index")" class="btn btn-default">返回</a>
        </div>
    }
    else
    {
        using (Html.BeginForm("Complate", "Setup", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)
            @Html.HiddenFor(m => m.DatabaseName)
            @Html.HiddenFor(m => m.DatabasePassword)
            @Html.HiddenFor(m => m.DatabaseServer)
            @Html.HiddenFor(m => m.DatabaseUser)
            @Html.HiddenFor(m => m.IsWithData)
            @Html.HiddenFor(m => m.SiteName)


            <h3>管理帐号</h3>

            <div class="form-group">
                @Html.LabelFor(model => model.AdminUser, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.AdminUser, new { @class = "form-control", placeholder = Labels.UserName })
                    @Html.ValidationMessageFor(model => model.AdminUser)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.AdminPassword, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.AdminPassword, new { @class = "form-control", placeholder = Labels.Password })
                    @Html.ValidationMessageFor(model => model.AdminPassword)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.ConfirmPassword, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control", placeholder = Labels.ConfirmPassword })
                    @Html.ValidationMessageFor(model => model.ConfirmPassword)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.AdminEmail, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-10">
                    @Html.TextBoxFor(model => model.AdminEmail, new { @class = "form-control", placeholder = Labels.Email })
                    @Html.ValidationMessageFor(model => model.AdminEmail)
                </div>
            </div>

            <footer class="well text-center">
                <button type="submit" class="btn btn-primary" id="btnSave"><i class="fa fa-save fa-fw"></i>  @Buttons.Setup </button>
                <button type="reset" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span> @Buttons.Reset</button>
            </footer>
        }
    }



</div>

@section footer{
    @Scripts.Render("~/bundles/jqueryvalWithBootstrap")
    <script>
    

    $(function () {

    });
    </script>
}
